package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.utils.page.TableDataInfo;

import cn.cdeden.knowledge.api.domain.dto.RemoteTemplate;
import cn.cdeden.knowledge.api.domain.page.PageQuery;
import cn.cdeden.knowledge.domain.EnterpriseFolderTree;
import cn.cdeden.knowledge.domain.dto.EnterpriseFolderTreeDto;
import cn.cdeden.knowledge.domain.dto.EnterpriseFolderTreeQueryParam;
import cn.cdeden.knowledge.domain.vo.EnterpriseFolderTreeVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
* @author GW
* @date 2023-03-27
*/
public interface EnterpriseFolderTreeService extends IService<EnterpriseFolderTree> {

    static final String CACHE_KEY = "enterpriseFolderTree";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<EnterpriseFolderTreeDto>
    */
    TableDataInfo<EnterpriseFolderTreeDto> queryAll(EnterpriseFolderTreeQueryParam query, Pageable pageable);

    TableDataInfo<EnterpriseFolderTreeDto> queryAll(EnterpriseFolderTreeQueryParam query, PageQuery pageQuery);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<EnterpriseFolderTreeDto>
    */
    List<EnterpriseFolderTreeDto> queryAll(EnterpriseFolderTreeQueryParam query);

    EnterpriseFolderTree getById(Long id);
    EnterpriseFolderTreeDto findById(Long id);

    /**
     * 插入一条新数据。
     */
    boolean updateById(EnterpriseFolderTreeDto resources);
    boolean deleteById(Long id);
    boolean deleteByIds(Set<Long> ids);

    EnterpriseFolderTreeDto selectNext(Long id);

    void createByEnterpriseId(EnterpriseFolderTreeVo enterpriseFolderTreeVo);
    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<EnterpriseFolderTreeDto> all, HttpServletResponse response) throws IOException;
}
